package com.multicampus.minishop.view.product;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.multicampus.minishop.framework.Action;
import com.multicampus.minishop.product.vo.ProductVO;
import com.multicampus.minishop.services.product.ProductService;
import com.multicampus.minishop.services.product.impl.ProductServiceImpl;

public class UpdateProductViewAction extends Action {

	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		int prodNo=Integer.parseInt(request.getParameter("prodNo"));
		
		ProductService service=new ProductServiceImpl();
		ProductVO vo=service.getProduct(prodNo);
		
		request.setAttribute("vo", vo);
		return "forward:/product/updateProduct.jsp";
	}
}
